let mongoose = require("mongoose"),
    db = mongoose.connection,
    classSchema = new mongoose.Schema({
      name:{type:String , required:true},
      pubdate:{type:Date , default:new Date},
      sort:{type:Number , default:0},
    });
    classS = db.model("class" , classSchema),
    Class = {
      add(Conditions , callback){
        classS.create(Conditions , callback);
      },
      get(Conditions , callback){
        classS.find(Conditions , callback);
      },
      remove(Conditions , callback){
        classS.remove(Conditions , callback);
      }
    };
module.exports = Class;
